#pragma once


#include <atlddx.h>
#include <atlcrack.h>
#include <atlctrls.h>

#include "resource.h"



class CRunningModeDlg : public CDialogImpl<CRunningModeDlg>,
	public CWinDataExchange<CRunningModeDlg>
{
public:
	CRunningModeDlg(void);
	~CRunningModeDlg(void);


	enum { IDD = IDD_DLG_RUNNING_MODE };

	WTL::CIPAddressCtrl acIp;
	WTL::CListBox ipListBox;

	BEGIN_MSG_MAP(CIpConfigDlg)
		MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
		COMMAND_ID_HANDLER(IDOK, OnCloseCmd)
		COMMAND_ID_HANDLER(IDCANCEL, OnCloseCmd)
	//	COMMAND_HANDLER_EX(IDC_BTN_CANCEL, BN_CLICKED, OnBtnCancelBnClicked)
	//	COMMAND_HANDLER_EX(IDC_BTN_OK, BN_CLICKED, OnBtnOkBnClicked)
		

	
	COMMAND_HANDLER(IDC_BTN_ADD, BN_CLICKED, OnBnClickedBtnAdd)
	COMMAND_HANDLER(IDC_BTN_DELETE, BN_CLICKED, OnBnClickedBtnDelete)
	COMMAND_HANDLER(IDC_BTN_OK, BN_CLICKED, OnBnClickedBtnOk)
	COMMAND_HANDLER(IDC_BTN_CANCEL, BN_CLICKED, OnBnClickedBtnCancel)
	END_MSG_MAP()


	LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	LRESULT OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);


	//LRESULT OnBtnCancelBnClicked(WORD wNotifyCode, WORD wID, HWND hWndCtl);
	//LRESULT OnBtnOkBnClicked(WORD wNotifyCode, WORD wID, HWND hWndCtl);

	LRESULT OnBnClickedBtnAdd(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
	LRESULT OnBnClickedBtnDelete(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
	LRESULT OnBnClickedBtnOk(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
	LRESULT OnBnClickedBtnCancel(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);


	int ResetDlgText(void);

};
